package payroll.webapp

class PersonDetails {
	String title
	String lastName
	String firstName
	String middleName
	String chineseFirstName
	String chineseLastName
	Date dateOfBirth
	Character gender
	Address permanentAddress
	Contact contact
	Nationality nationality
	String passportNumber
	String socialSecurityNumber
	
		
    static constraints = {
		title(nullable:true, blank:true)
		lastName(maxSize:255, nullable:false, blank:false)
		firstName(maxSize:255, nullable:false, blank:false)
		middleName(maxSize:255, nullable:true, blank:true)
		chineseFirstName(nullable:true)
		chineseLastName(nullable:true)
		dateOfBirth(nullable:true, blank:true)
		gender(matches:"[mfMF]", blank:true, nullable:true)
		permanentAddress(nullable:true)
		contact(nullable:true)
		nationality(nullable:true)
		passportNumber(nullable:true)
		socialSecurityNumber(nullable:true)
    }
	
	static mapping = {
		table "persons"
	}
	
	static belongsTo = [employee:Employee]
}
